/*
 * A class for loading up levels
 */
package com.killgun.level;

import com.jme3.asset.AssetManager;
import com.jme3.scene.Spatial;

/**
 *
 * @author Austin Allman
 */
public class LevelLoader {

    private AssetManager assetManager;

    public LevelLoader(AssetManager assetManager) {
        this.assetManager = assetManager;
    }

    /**
     * Returns a spatial loaded from the level
     *
     * @param level what level to load
     * @return the spatial of the level that gets loaded
     * @deprecated 
     */
    public Spatial loadLevel(Level level) {
        return assetManager.loadModel(level.getSceneLocation());
    }
    
    public Spatial loadLevel(String level){
        return assetManager.loadModel(level);
    }
}
